<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model="num">
        <button v-on:click="num++">点赞</button>
        <button v-on:click="cancle">取消</button>
        <h1>{{name}},不错不错,有{{num}}个人为他点赞</h1>
    </div>
    <script src="../node_modules/vue/dist/vue.js">
    </script>
    <script>
        //1、声明式渲染
        let vm = new Vue({
            el: "#app",
            data: {
                name: "张三",
                num: 1
            },
            methods:{
                cancle(){
                    this.num--;
                }
            }
        })

        //2、双向绑定，模型变化
        //3、v-XX指令
    </script>
</body>
</html>